package com.css.openapi.feign;

import com.css.common.core.constant.Result;
import com.css.common.core.constant.ReturnCode;
import com.css.common.core.constant.ValidGroup;
import com.css.openapi.BO.*;
import com.css.openapi.BO.fxdw.*;
import com.css.openapi.BO.lypt.BdKpyReq;
import com.css.openapi.BO.lypt.BdKpyResponse;
import com.css.openapi.BO.lypt.QueryKpyRepsonse;
import com.css.openapi.BO.lypt.QueryShkpyRequest;
import com.css.openapi.BO.lypt.ShbdResponse;
import com.css.openapi.BO.lypt.ShbdztQueryRepsonse;
import com.css.openapi.BO.lypt.SqmResponse;
import com.css.openapi.BO.lypt.ZfjkpYlwebQydglWxtjrResponse;
import com.css.openapi.config.ZfjkpPtFeignConfig;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.Map;

/**
 * @description: 银联商务银行卡相关接口
 * @Title: YlswYhkCommonClient
 * @Author zhuowugong
 * @Package com.invoice.feign
 * @Date 2024/8/17 15:37
 */
@Api("支付即开票平台相关接口")
@FeignClient(name = "zfjkppt", url = "${zfjkppt.zfjkppturl}", configuration = ZfjkpPtFeignConfig.class)
public interface ZfjkpPtCommonClient {

	@ApiOperation("商户绑定申请")
    @PostMapping("/wxtjr/api/shbdsq")
	ShbdResponse shbdsq(@RequestBody ShbdReq shbdReq);

	@ApiOperation("商户信息登记")
	@PostMapping("/wxtjr/api/shxxDj")
	ReturnCode shxxDj(@RequestBody ShxxdjReq shbdReq);

	@ApiOperation("商户绑定状态查询")
	@PostMapping("/wxtjr/api/queryShbdzt")
	ShbdztQueryRepsonse queryShbdzt(@RequestBody ShbdztQueryRequest req);

	@ApiOperation("商户解绑")
	@PostMapping("/wxtjr/api/shjbSq")
	ReturnCode unBindYwlx(@RequestBody ShbdztQueryRequest req);

	@ApiOperation("获取授权码")
	@PostMapping("/wxtjr/api/getSqm")
	SqmResponse getSqm(@RequestBody LqsqWxtjrReq req);

	@ApiOperation("取商户授权状态（乐企接入状态，白名单开通状态，授权认证信息）")
	@PostMapping("/wxtjr/api/getShlqsqzt")
	ZfjkpYlwebQydglWxtjrResponse getShlqsqzt(@RequestBody LqsqWxtjrReq req);

	@ApiOperation("查询开票员")
	@PostMapping( "/wxtjr/api/queryKpy")
	QueryKpyRepsonse queryKpy(@RequestBody QueryShkpyRequest req);

	@ApiOperation("绑定开票员")
	@PostMapping("/wxtjr/api/bdKpy")
	BdKpyResponse bdKpy(@RequestBody BdKpyReq req);

	@ApiOperation("商户余额查询")
	@PostMapping("/api/gl/shgl/v1/queryYe")
	Map<String,Object> queryYe(@Validated @RequestBody ShbdbhReq req);

	@ApiOperation("解绑开票员")
	@PostMapping("/wxtjr/api/jbKpy")
	ReturnCode jbKpy(@RequestBody Map<String,String> req);

	@ApiOperation("商户提现")
	@PostMapping("/api/gl/shgl/v1/withDrawals")
	Map<String,Object> withDrawals(@Valid @RequestBody ShzhtxReq req);

	@ApiOperation("自然人实名登记")
	@PostMapping("/api/zrr/v1/zrrSmdj")
	ReturnCode zrrSmdj(@Validated @RequestBody ZrrSmdjReq req);

	@ApiOperation("创建订单")
	@PostMapping("/api/fxkp/createOrder")
	FxkpOrderResultBO createOrder(@Validated(ValidGroup.COMMON.class) @RequestBody FxkpOrderBO fxkpOrderBO);

	@ApiOperation("批量创建待支付开票订单")
	@PostMapping("/api/fxkp/batchCreateOrder")
	Result<Map<String,String>> batchCreateOrder(@Validated @RequestBody PcBO pc);

	@ApiOperation("创建待开票订单（非银联代付模式-定制化）")
	@PostMapping("/api/fxkp/mtCreateOrder")
	FxkpOrderResultBO mtCreateOrder(@Validated(ValidGroup.MAOTAI.class) @RequestBody FxkpOrderBO fxkpOrderBO);

	@ApiOperation("确认支付开票（银联代付模式）")
	@PostMapping("/api/fxkp/payAndKpSubmit")
	SimpleBooleanResponse payAndKpSubmit(@Valid @RequestBody PayAndKpSubmitBO payAndKpSubmitBO);

	@ApiOperation("创建缴税二维码")
	@PostMapping("/api/fxkp/taxQrCode")
	TaxQrCodeBO taxQrCode(@Valid @RequestBody FxOrderQueryBO param);

	@ApiOperation("订单状态查询")
	@PostMapping("api/fxkp/v2/orderStatus")
	FxOrderStatusResponse orderStatus(@Valid @RequestBody FxOrderStatusReq req);

	@ApiOperation("自然人销售额查询（再生资源回收适用）")
	@PostMapping("/api/fz/v1/queryZrrXse")
	ZrrXsecxRep queryZrrxse(@RequestBody Map<String,String> param);

    @ApiOperation("查询订单发票")
    @PostMapping("/api/fxkp/queryOrderInvoice")
    FxOrderInvoiceResponse queryOrderInvoice(@Valid @RequestBody FxOrderQueryBO fxOrderQueryBO);

    @ApiOperation("订单红冲")
    @PostMapping("/api/fxkp/orderRed")
	SimpleBooleanResponse orderRed(@Valid @RequestBody FxOrderQueryBO fxOrderQueryBO);

    @ApiOperation("退税提交")
    @PostMapping("/api/fxkp/returnTax")
    TssqResponse refundTaxCommit(@Valid @RequestBody TssqParamsBO params);

    @ApiOperation("退税结果")
    @PostMapping("/api/fxkp/returntTaxResult")
    TsjgResponse refundTaxResult(@Valid @RequestBody TsjgParamsBO params);

	@ApiOperation("订单取消")
	@PostMapping("/api/fxkp/orderCancel")
	SimpleBooleanResponse orderCancel(@Valid @RequestBody FxOrderCancelBO fxOrderCancelBO);

	@ApiOperation("查询批量订单状态")
	@PostMapping("/api/fxkp/orderStatusBatch")
	PcOrderStatusResponse orderStatusBatch(@Valid @RequestBody PcOrderQueryBO param);

    @ApiOperation("农产品订单审核")
    @PostMapping("/api/fxkp/ncpOrderAudit")
    SimpleBooleanResponse ncpOrderAudit(@Valid @RequestBody NcpOrderAuditBO params);

    @ApiOperation("再生资源二次支付订单创建")
    @PostMapping("/api/fxkp/createZszyOrder")
    CreateZszyOrderResponse createZszyOrder(@Validated(ValidGroup.FPSG.class) @RequestBody FxkpOrderBO fxkpOrderBO);

    @ApiOperation("再生资源二次支付订单状态查询")
    @PostMapping("/api/fxkp/queryZszyOrderStatus")
    QueryZszyOrderStatusResponse queryZszyOrderStatus(@Valid @RequestBody FxOrderStatusReq req);

    @ApiOperation("再生资源二次支付")
    @PostMapping("/api/fxkp/zszyOrderPay")
    ZszyOrderPayResponse zszyOrderPay(@Validated @RequestBody ZszyPayBO params);

    @ApiOperation("代付回单凭证下载")
    @PostMapping("/api/fz/v1/downloadelecreceipt")
	DownloadElecreceiptResponse downloadelecreceipt(@Validated @RequestBody DownloadElecreceiptBO params);

	@ApiOperation("蓝票开具")
	@PostMapping("/wxtjr/api/issueBlueInvoice")
	IssueBlueInvoiceResponse issueBlueInvoice(@RequestBody IssueBlueInvoiceRequest param);

	@ApiOperation("发票状态查询")
	@PostMapping("/wxtjr/api/queryOrderStatus")
	QueryOrderStatusResponse queryOrderStatus(@RequestBody QueryOrderStatusRequest param);

	@ApiOperation("发票下载")
	@PostMapping("/wxtjr/api/downloadInvoice")
	DownloadInvoiceResponse downloadInvoice(@RequestBody DownloadInvoiceRequest param);

	@ApiOperation("发票换开")
	@PostMapping("/wxtjr/api/replaceInvoice")
	ReplaceInvoiceResponse replaceInvoice(@RequestBody FpttInfoVO param);

	@ApiOperation("红字发票开具")
	@PostMapping("/wxtjr/api/issueRedInvoice")
	IssueRedInvoiceResponse issueRedInvoice(@RequestBody IssueRedInvoiceRequest param);
}
